package com.gdou.crrp.repository;

import com.gdou.crrp.entity.ArticleCollect;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface ArticleCollectRepository extends JpaRepository<ArticleCollect, Integer> {

    @Transactional
    void deleteByAidAndUid(Integer aid, Integer uid);

    List<ArticleCollect> findAllByUid(Integer uid);

    ArticleCollect findByAidAndUid(Integer aid,Integer uid);
}
